
<?php
/*
Template Name: ajax_calls
*/

$post_id = $_GET["post_id"];

query_posts('p=' . $post_id);

?>


<script type="text/javascript">
    if ($('.tabbed-page').length) {
    
    	var jqFirst = true;
    	
    	$(function () {
    		var tabContainers = $( '.tabbed-page' );
    		if ( !jqFirst ) {
    			tabContainers.hide();
    		}
    		    		
    		var menuItems = $( 'ul#content_tabs a' );
    		
    		menuItems.click( function() {
      			menuItems.removeClass( 'active' );
      			$(this).addClass( 'active' );
      			
      			var linkLocation = $(this).attr( 'href' );
      			var linkBits = linkLocation.split( '/' );
      			var divLocation = linkBits[ linkBits.length - 2 ];
      	
      			if ( !jqFirst ) {
      				$( '.tabbed-page' ).hide();
      				$( '#' + divLocation ).fadeIn( 300 );
      			} else {
      				jqFirst = false;
      			}
      			
      			return false;
    		});	
    		
    		menuItems.filter( ':first' ).click();	
    	});
    }

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
}    
    
</script>


<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>		  
  <?php the_content(); ?>   	
	<?php edit_post_link( __( 'Edit this entry', 'ccr' ), '<span class="edit-link">', '</span>' ); ?>	
	
<?php endwhile; ?>